<?php
namespace yan\editor_frontend\editorxml;
use yii\helpers\Html;
class WebEditorWidget extends WebWidget{
	public function run(){
		if(empty($this->value['value'])) return null;

		$options = $this->options;

		$shtml = \common\utils\Helper::showContent($this->value['value']['content']);
		$option_class = str_replace(['WebEditorWidget '], "", $options['class']);
		if(!empty($option_class)){
			$shtml = Html::tag('div', $shtml, $options);			
		}
		return $shtml;
	}
}